# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: Charles Mauch <cmauch@gmail.com>

pkgname=perl-text-charwidth
pkgver=0.04
pkgrel=21
pkgdesc="Perl/CPAN Module Text::CharWidth"
arch=("loong64" "x86_64")
url="https://search.cpan.org/dist/Text-CharWidth"
license=("GPL" "PerlArtistic")
options=('!emptydirs')
source=("https://www.cpan.org/authors/id/K/KU/KUBOTA/Text-CharWidth-${pkgver}.tar.gz")
sha256sums=('abded5f4fdd9338e89fd2f1d8271c44989dae5bf50aece41b6179d8e230704f8')

build() {
  cd Text-CharWidth-${pkgver}

  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor

  make
}

package() {
  cd Text-CharWidth-${pkgver}

  make install DESTDIR="$pkgdir"

  find "$pkgdir" -name '.packlist' -delete
  find "$pkgdir" -name '*.pod' -delete
}
